<?php
/**
 * Created by 绵阳市碳素云信息技术有限责任公司.
 * User: autoModel.php
 * Date: 2015/05/06
 * Time: 18:34
 */
function notes(){
//    示例返回json
    $Accessories = json_decode('{"AccessoriesID":"2","Name":"name","Model":"MOdel","Number":"4294967295"}',true);
    $Log = json_decode('{"LID":"2","Type":"1","UID":["1","castle"],"Content":"cc","Time":"2015-05-15 16:51:02","OrderID":"1"}]}',true);
    $Order = array(
        'OrderID'=>1,
        'Model'=>'Model',
        'Color'=>'颜色',
        'Contact'=>'联系人',
        'Phone'=>'联系电话',
        'Address'=>'联系地址',
        'AccessoriesID'=>'1,2',
        'Phenomenon'=>'故障表现',
        'Memo'=>'备注',
        'Status'=>'1',
        'Time'=>'2015-05-15 11:11:56',
        'Accessories'=>array($Accessories,$Accessories),
        'Log'=>array($Log,$Log),
    );
    $demo = array(
//        '类名(不带Controller)'=>array(
//            '方法名'=>array()//数组格式的json返回示例
//        ),
        'Order'=>array(
            'add'=>array(1),
            'get'=>array($Order),
            'getByStatus'=>array(
                'Page'=>1,
                'PageNumber'=>10,
                'Total'=>20,
                'List'=>array(
                    $Order,$Order,$Order,$Order,$Order,$Order,$Order,$Order,$Order,$Order,$Order,
                )
            )
        ),
        'Log'=>array(
            'add'=>array()
        ),
        'Accessories'=>array(
            'add'=>array('AccessoriesID'=>1),
            'del'=>array()
        ),
        'Search'=>array(
            'search'=>array($Order,$Order)
        )
    );
    $request = array(
//        '类名(不带Controller)'=>array(
//            '方法名'=>array()//数组或英文状态下的逗号分隔的非括号里面定义的需要参数
//        ),
    );
    $notes = array(
//        '参数英文名'=>array('参数类型','参数中文名','参数说明','最短长度或最小值','最大长度或最大值')
            'AccessoriesID'=>array('char','配件编号','',1,50),
        'Name'=>array('char','配件名称','',1,50),
        'Model'=>array('char','型号','',1,50),
        'Number'=>array('int','数量','',1,99999999999),
        'OrderID'=>array('int','订单编号','',1,99999999999),
        'Color'=>array('char','颜色','',1,50),
        'Contact'=>array('char','联系人','',1,50),
        'Phone'=>array('char','联系电话','',1,50),
        'Address'=>array('char','联系地址','',1,200),
        'Phenomenon'=>array('char','故障表现','',1,200),
        'Memo'=>array('char','备注','',1,200),
        'Status'=>array('tinyint','状态','',1,9),
        'Time'=>array('int','时间','',1,9999999999),
        'LID'=>array('int','维修处理记录编号','',1,99999999999),
        'Type'=>array('int','维修类型','',1,99999999999),
        'UID'=>array('int','用户编号','',1,99999999999),
        'Content'=>array('char','维修对应的内容','',1,200),
        'keyword'=>array('char','关键字','',1,200),

    );
    $memo = array(
//        '类名(不带Controller)'=>array(
//            '方法名'=>array('方法中文名称','方法的说明，如使用说明可以编写在这儿')//数组格式的json返回示例
//        ),
        'Order'=>array(
            'add'=>array('添加订单','处理逻辑有点曲折哈，返回值直接是订单编号'),
            'get'=>array('获取订单'),
            'getByStatus'=>array('获取不同状态的订单')
        ),
        'Log'=>array(
            'add'=>array('添加处理过程')
        ),
        'Accessories'=>array(
            'add'=>array('添加配件'),
            'del'=>array('删除配件')
        ),
        'Search'=>array(
            'search'=>array('搜索')
        )
    );
    return array('demo'=>$demo,'memo'=>$memo,'request'=>$request,'notes'=>$notes);
}
return notes();